package com.rockcent.mall.lib.repository;


import com.rockcent.common.common.PageResult;
import com.rockcent.mall.lib.domain.MerchantOrderItem;
import com.rockcent.mall.lib.dto.MerchantOrderItemDto;

import java.math.BigDecimal;
import java.util.List;

/**
 * Created by zhangjh on 2016/10/31.
 */
public interface MerchantOrderItemRepositoryCustom {

    PageResult<MerchantOrderItemDto> findIncomeCollectInfoPage(Long productId, Long mallId, Long merchantId, PageResult page);

    /**
     * 可退的服务产品，到期未使用
     * @param productRefundable
     * @return
     */
    List<MerchantOrderItem> queryAllCanCancelMerchantOrders(String productRefundable);

    List<MerchantOrderItemDto> findMerchantOrderItemList(Long merchantOrderId);

    Long countSaleProductCountByMerchantId(Long merchantId);

    Double countSaleTotalAmoutByMerchantId(Long merchantId);

    Long countSaleOrderAmountByMerchantId(Long merchantId);

    MerchantOrderItem caculateSaleCountAndVerifyCountByMallIdAndMerchantIdAndProductId(Long mallId, Long merchantId, Long productId);
}
